package com.ban.springcloud.feign;

import com.ban.springcloud.bean.CommonResult;
import com.ban.springcloud.bean.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Ban
 * @version 1.0
 * Create by 2022/1/15 15:26
 * 此处的 service 层编写与 cloud-consumer-order80 的 controller 层相同
 */
@Component
@FeignClient("CLOUD-PAYMENT-SERVICE")
public interface PaymentService {
    @GetMapping("/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);
}
